Optimal. Leaf size=72 \[ -\frac{b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+a x \left (a^2-3 b^2\right )+\frac{2 a b^2 \tan (c+d x)}{d}+\frac{b (a+b \tan (c+d x))^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0925312, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3086, 3482, 3525, 3475} \[ -\frac{b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+a x \left (a^2-3 b^2\right )+\frac{2 a b^2 \tan (c+d x)}{d}+\frac{b (a+b \tan (c+d x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3086
Rule 3482
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx &=\int (a+b \tan (c+d x))^3 \, dx\\ &=\frac{b (a+b \tan (c+d x))^2}{2 d}+\int (a+b \tan (c+d x)) \left (a^2-b^2+2 a b \tan (c+d x)\right ) \, dx\\ &=a \left (a^2-3 b^2\right ) x+\frac{2 a b^2 \tan (c+d x)}{d}+\frac{b (a+b \tan (c+d x))^2}{2 d}+\left (b \left (3 a^2-b^2\right )\right ) \int \tan (c+d x) \, dx\\ &=a \left (a^2-3 b^2\right ) x-\frac{b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac{2 a b^2 \tan (c+d x)}{d}+\frac{b (a+b \tan (c+d x))^2}{2 d}\\ \end{align*}
Mathematica [C] time = 0.267994, size = 79, normalized size = 1.1 \[ \frac{6 a b^2 \tan (c+d x)+(-b+i a)^3 \log (-\tan (c+d x)+i)-(b+i a)^3 \log (\tan (c+d x)+i)+b^3 \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.122, size = 93, normalized size = 1.3 \begin{align*}{a}^{3}x+{\frac{{a}^{3}c}{d}}-3\,{\frac{{a}^{2}b\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-3\,a{b}^{2}x+3\,{\frac{a{b}^{2}\tan \left ( dx+c \right ) }{d}}-3\,{\frac{a{b}^{2}c}{d}}+{\frac{{b}^{3} \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{2\,d}}+{\frac{{b}^{3}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.7547, size = 115, normalized size = 1.6 \begin{align*} \frac{2 \,{\left (d x + c\right )} a^{3} - 6 \,{\left (d x + c - \tan \left (d x + c\right )\right )} a b^{2} - b^{3}{\left (\frac{1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} - 3 \, a^{2} b \log \left (-\sin \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.505707, size = 215, normalized size = 2.99 \begin{align*} \frac{2 \,{\left (a^{3} - 3 \, a b^{2}\right )} d x \cos \left (d x + c\right )^{2} + 6 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \,{\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + b^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20417, size = 96, normalized size = 1.33 \begin{align*} \frac{b^{3} \tan \left (d x + c\right )^{2} + 6 \, a b^{2} \tan \left (d x + c\right ) + 2 \,{\left (a^{3} - 3 \, a b^{2}\right )}{\left (d x + c\right )} +{\left (3 \, a^{2} b - b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]